//
//  UIImage+TZExtension.m
//  TZ微博
//
//  Created by my-pc on 16/2/24.
//  Copyright © 2016年 litianzhuo. All rights reserved.
//

#import "UIImage+TZExtension.h"

@implementation UIImage (TZExtension)


+(UIImage *)imageWithName:(NSString*)name
{
    UIImage *image = nil;
    if (iOS7)
    {
        NSString *newName = [name stringByAppendingString:@"_os7"];
        image = [UIImage imageNamed:newName];
    }
    if (image == nil) {
        image = [UIImage imageNamed:name];
    }
    return image;
}


+(UIImage *)resizedImage:(NSString *)name
{
    UIImage *image = [UIImage imageWithName:name];
    return [image stretchableImageWithLeftCapWidth:image.size.width*0.5 topCapHeight:image.size.height*0.5];
    
}
@end
